home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Select: Games Special 4
/
THE BEST OF SELECT Games Special 4 (Select CD-ROM)(1996).iso
/
dosgames
/
abuse
/
lisp
/
ladder.lsp
< prev
next >
Wrap
Lisp/Scheme
|
1995-09-13
|
1KB
|
44 lines
;; Copyright 1995 Crack dot Com, All Rights reserved
;; See licensing information for more details on usage rights
(defun latter_check_area (first)
(if first
(progn
(if (and (<= (x) (with_object first (x)))
(<= (y) (with_object first (y)))
(>= (with_object (get_object 0) (x)) (with_object first (x)))
(>= (with_object (get_object 0) (y)) (with_object first (y))))
(let ((yd (- (with_object first (y)) (y))))
(if (eq (with_object first (state)) climbing)
(let ((newx (/ (+ (x) (with_object (get_object 0) (x))) 2)))
(with_object first (set_x newx))))
(with_object first (setq in_climbing_area yd))))
(latter_check_area (next_focus first)))))
(defun latter_ai ()
(if (> (total_objects) 0)
(latter_check_area (first_focus)))
T)
(def_char LADDER
(funs (ai_fun latter_ai)
(draw_fun dev_draw))
(range 50 800)
(states "art/misc.spe" (stopped "latter")))
(defun step_ai ()
(if (or (eq (total_objects) 0)
(with_object (get_object 0) (not (eq (aistate) 0))))
(set_state stopped)
(set_state running))
T)
(def_char STEP
(funs (ai_fun step_ai))
(flags (can_block T))
(states "art/chars/step.spe"
(stopped "step")
(running "step_gone")))